﻿<phone:PhoneApplicationPage 
  x:Class="LimitlessLightSwitch.SettingsPage"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
  xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:Helper="clr-namespace:LimitlessLightSwitch.Helper"
  FontFamily="{StaticResource PhoneFontFamilyNormal}"
  FontSize="{StaticResource PhoneFontSizeNormal}"
  Foreground="{StaticResource PhoneForegroundBrush}"
  SupportedOrientations="Portrait" Orientation="Portrait"
  mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
  shell:SystemTray.IsVisible="True">

  <phone:PhoneApplicationPage.Resources>
    <Helper:AppSettings x:Key="MySettings"/>
  </phone:PhoneApplicationPage.Resources>
  <Grid x:Name="ContentGrid" Grid.Row="1" Margin="12,17,12,28">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition/>
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Text="{Binding Path=LocalizedResources.Hostname, Source={StaticResource LocalizedStrings}}"/>
    <TextBox x:Name="txtHostName" Grid.Row="0" Grid.Column="1" Text="{Binding Source={StaticResource MySettings}, Path=HostNameSetting, Mode=OneWay}"/>
    <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Text="{Binding Path=LocalizedResources.Port, Source={StaticResource LocalizedStrings}}"/>
    <TextBox x:Name="txtPort" Grid.Row="1" Grid.Column="1" Text="{Binding Source={StaticResource MySettings}, Path=PortSetting, Mode=OneWay}"/>
  </Grid>
</phone:PhoneApplicationPage>